<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
	xmlns:vul="main.br.org.indt.ndg.ui.view.adm.usersList.*"
	xmlns:vdm="main.br.org.indt.ndg.ui.view.adm.deviceManager.*">

	<mx:Script>
		<![CDATA[
			//states
			private function changeView():void{
				if (viewStack.selectedIndex == 1 && imeiList !== null){
					imeiList.listImeisFirstPage(userList.getSelectedUser());
				}
			}
			private function creationImeis():void{
				imeiList.listImeisFirstPage(userList.getSelectedUser());
			}
		]]>
	</mx:Script>


    <mx:Dissolve id="dissolveOut" duration="500" alphaFrom="1.0" alphaTo="0.0"/>
    <mx:Dissolve id="dissolveIn" duration="500" alphaFrom="0.0" alphaTo="1.0"/>
    
    
	<mx:ViewStack id="viewStack" change="changeView()">
		<!-- List of Users -->
		<mx:VBox hideEffect="{dissolveOut}" showEffect="{dissolveIn}">
			<vul:UserList id="userList" myStack="{viewStack}"/>
		</mx:VBox>
		<!-- List of IMEIs -->
		<mx:HBox hideEffect="{dissolveOut}" showEffect="{dissolveIn}">
			<vdm:ImeiList id="imeiList" myStack="{viewStack}" creationComplete="creationImeis()"/>
		</mx:HBox>
	</mx:ViewStack>	



</mx:Module>
